\pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f0\b0\i0\ulnone\fs28\fc0\cf0 Q: In my application when my window becomes the key window or the main window, sometimes it doesn't display itself. What's going on?\
\
A:
\fc1\cf1 There is a bug where
\b display
\b0 sometimes is disabled in a Window when the window becomes key and/or main. The result is that a window (or its delegate) tries to do some drawing in its
\b becomeKeyWindow
\b0 or
\b becomeMainWindow
\b0 (or
\b windowDidBecomeKey:
\b0 or
\b windowDidBecomeMain:
\b0 ) method, and the drawing doesn't happen because some drawer observes that display is disabled.\
\
Here's a workaround. You can do this little dance in either your delegate method or your override of Window's
The _isInvalid method is a private method, and as such is undocumented. Calling this ensures that you are in the case where this bug bites. We thought this might be prudent in case there was a different time when you really would like display to be disabled. \